package com.dmzc.linkedlist;

/**
 * 单链表节点
 */
public class ListNode {
    ListNode prev;
    ListNode next;
    private int num;

    @Override
    public String toString() {
        return num + "";
    }

    public ListNode(int num) {
        this.num = num;
    }

    public void show() {
        ListNode node = this;
        while (node != null) {
            System.out.println(node);
            node = node.next;
        }
    }

}
